package net.hn.hnms.biz.energy.domain;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@NoArgsConstructor
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper=false)
@Table(name = "water_settlement", schema = "nygl", catalog = "huaneng-general")
public class WaterSettlement extends BaseModel implements Serializable {

    @ApiModelProperty(value = "id")
    @TableField(value = "water_settle_id", fill = FieldFill.INSERT)
    @TableId(type = IdType.ASSIGN_UUID)
    private String waterSettleId;

    @ApiModelProperty(value = "供水单位ID")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String waterSupplyCompanyId;

    @ApiModelProperty(value = "用水地点ID")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String waterPlaceId;

    @ApiModelProperty(value = "用水单价")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal waterUnitPrice;

    @ApiModelProperty(value = "上次抄表值")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal lastMeterValue;

    @ApiModelProperty(value = "上次抄表日期")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    @JsonFormat(
            pattern = "yyyy-MM-dd",
            timezone = "GMT+8"
    )
    private Date lastMeterDate;

    @ApiModelProperty(value = "本次抄表值")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal meterValue;

    @ApiModelProperty(value = "本次抄表日期")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    @JsonFormat(
            pattern = "yyyy-MM-dd",
            timezone = "GMT+8"
    )
    private Date meterDate;

    @ApiModelProperty(value = "用水量（m3）")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal waterConsumption;

    @ApiModelProperty(value = "备注")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String remark;



}
